── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.5
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ ggplot2 3.5.2 ✔ tibble 3.3.0
✔ lubridate 1.9.4 ✔ tidyr 1.3.1
✔ purrr 1.1.0
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
Code
library(rafalib)library(plotly)
Attaching package: 'plotly'
The following object is masked from 'package:ggplot2':
last_plot
The following object is masked from 'package:stats':
filter
The following object is masked from 'package:graphics':
layout
Based on figure 1, the general discomfort has the most significant increase among all side effects for people who don’t see the social model. Interestingly, there is a negative difference which means, after VR, it reduces some people fatigue.
Code
happy <- pooled_data %>%group_by(happy) %>%reframe(diff2 =sum(ASSQ_3) -sum(BSSQ_3), people =n(), average = diff2 / people)happy
ggplot(pooled_data_vr_exp1) +geom_bar(stat ="identity", aes(x = VRexperience, y = avg_ssq_full, fill = VRexperience)) +labs(x ="VR Experience", title ="Mean difference in Side Effect Severity", y ="Mean") +theme_minimal() +theme(plot.title =element_text(hjust =0.5) )
Code
pooled_data_vr_exp2
# A tibble: 2 × 2
VRexperience avg_ssq_full
<chr> <dbl>
1 No 14.7
2 Yes 14.4
Code
ggplot(pooled_data_vr_exp2) +geom_bar(stat ="identity", aes(x = VRexperience, y = avg_ssq_full, fill = VRexperience)) +labs(x ="VR Experience", title ="Mean difference in Side Effect Severity", y ="Mean") +theme_minimal() +theme(plot.title =element_text(hjust =0.5) )
Code
min(pooled_data$age)
[1] 17
Code
max(pooled_data$age)
[1] 58
Code
pooled_data_age <-mutate(filter(pooled_data, cont_1=="SM"), age_interval =case_when(23>= age & age >=18~"18 - 23",29>= age & age >=24~"24 - 29",34>= age & age >=30~"30 - 34", age >=35~"35 - 40"))pooled_data_age %>%group_by(age_interval) %>%reframe(mean_diff =mean(ssq_full))